<html>
<head><meta charset="utf-8"><title>async blocks are always by &quot;move&quot;, right? · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html">async blocks are always by &quot;move&quot;, right?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="169727581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/async%20blocks%20are%20always%20by%20%22move%22%2C%20right%3F/near/169727581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html#169727581">(Jul 05 2019 at 18:28)</a>:</h4>
<p>Quick check: I presume that <code>async { ... }</code> always captures its environment by move?</p>



<a name="169731312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/async%20blocks%20are%20always%20by%20%22move%22%2C%20right%3F/near/169731312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html#169731312">(Jul 05 2019 at 19:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  That seems strange since we have <code>async move { ... }</code> and also:<br>
- <a href="https://github.com/rust-lang/rust/blob/853f30052d019a8ebe197a5adff3a29d6716a955/src/libsyntax/parse/parser.rs#L3323-L3341" target="_blank" title="https://github.com/rust-lang/rust/blob/853f30052d019a8ebe197a5adff3a29d6716a955/src/libsyntax/parse/parser.rs#L3323-L3341">https://github.com/rust-lang/rust/blob/853f30052d019a8ebe197a5adff3a29d6716a955/src/libsyntax/parse/parser.rs#L3323-L3341</a></p>



<a name="169731369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/async%20blocks%20are%20always%20by%20%22move%22%2C%20right%3F/near/169731369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html#169731369">(Jul 05 2019 at 19:36)</a>:</h4>
<p>Hmm, indeed. Perhaps I am mistaken.</p>



<a name="169732456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/async%20blocks%20are%20always%20by%20%22move%22%2C%20right%3F/near/169732456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html#169732456">(Jul 05 2019 at 19:58)</a>:</h4>
<p>lol it seems i've been typing <code>async move { }</code> without even noticing</p>



<a name="169904310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/async%20blocks%20are%20always%20by%20%22move%22%2C%20right%3F/near/169904310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/async.20blocks.20are.20always.20by.20.22move.22.2C.20right.3F.html#169904310">(Jul 08 2019 at 20:58)</a>:</h4>
<p>haha</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>